翻訳と辞書
Words near each other
・ Nulkaba, New South Wales
・ Null
・ Null (comics)
・ Null (computing)
・ Null (Foetus EP)
・ Null (Intronaut EP)
・ Null (mathematics)
・ Null (physics)
・ Null (radio)
・ Null (SQL)
・ Null allele
・ Null allomorph
・ Null and Void Ordinance
・ Null Bazaar
・ Null cell
Null character
・ Null cipher
・ Null coalescing operator
・ Null corrector
・ Null cycle
・ Null Device
・ Null device
・ Null distribution
・ Null dust solution
・ Null encryption
・ Null fill
・ Null function
・ Null graph
・ Null House
・ Null hypersurface


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Null character : ウィキペディア英語版
Null character

The null character (also null terminator), abbreviated NUL, is a control character with the value zero.
It is present in many character sets, including ISO/IEC 646 (or ASCII), the C0 control code, the Universal Character Set (or Unicode), and EBCDIC. It is available in nearly all mainstream programming languages.〔"A byte with all bits set to 0, called the ''null character'', shall exist in the basic execution character set; it is used to terminate a character string literal." — ANSI/ISO 9899:1990 (the ANSI C standard), section 5.2.1〕
The original meaning of this character was like NOP—when sent to a printer or a terminal, it does nothing (some terminals, however, incorrectly display it as space). When electromechanical teleprinters were used as computer output devices, one or more null characters were sent at the end of each printed line to allow time for the mechanism to return to the first printing position on the next line. On punched tape, the character is represented with no holes at all, so a new unpunched tape is initially filled with null characters, and often text could be "inserted" at a reserved space of null characters by punching the new characters into the tape over the nulls.
Today the character has much more significance in C and its derivatives and in many data formats, where it serves as a reserved character used to signify the end of a string,〔"A ''string'' is a contiguous sequence of characters terminated by and including the first null character" — ANSI/ISO 9899:1990 (the ANSI C standard), section 7.1.1〕 often called a null-terminated string. This allows the string to be any length with only the overhead of one byte; the alternative of storing a count requires either a string length limit of 255 or an overhead of more than one byte (there are other advantages/disadvantages described under null-terminated string).
== Representation ==

The null character is often represented as the escape sequence \0 in source code string literals or character constants.〔Kernighan and Ritchie, ''C'', p. 38〕 In many languages (such as C, which introduced this notation), this is not a separate escape sequence, but an octal escape sequence with a single octal digit of 0; as a consequence, \0 must not be followed by any of the digits 0 through 7; otherwise it is interpreted as the start of a longer octal escape sequence.〔In YAML this combination is a (separate escape sequence ).〕 Other escape sequences that are found in use in various languages are \000, \x00, \z, or the Unicode representation \u0000. A null character can be placed in a URL with %00.
The ability to represent a null character does not always mean the resulting string will be correctly interpreted, as many programs will consider the null to be the end of the string. Thus the ability to type it (in case of unchecked user input) creates a vulnerability known as null byte injection and can lead to security exploits.〔(Null Byte Injection ) WASC Threat Classification Null Byte Attack section.〕
In caret notation the null character is ^@. On some keyboards, one can enter a null character by holding down and pressing (which usually requires also holding and pressing another key such as or ). It is also common to be able to type a null with or or .
In documentation the null character is sometimes represented as a single-em-width symbol containing the letters "NUL". In Unicode, there is a character with a corresponding glyph for visual representation of the null character, "symbol for null", U+2400 ((unicode:␀))—not to be confused with the actual null character, U+0000.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Null character」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.